package com.hcyy.util;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.XMLConfiguration;

public class PictureUtil {
	
	public static List<String> getPictureList(String spid,String picture) throws ConfigurationException
	{
		if(picture==null)return null;
		List<String> picList=new ArrayList<String>();
		Configuration config = new XMLConfiguration("config.xml"); 
		String prefix = config.getString("img_url_prefix.spkfp_prefix");
		for(int i=0;i<10;i++){
			if(picture.substring(i, i+1).equalsIgnoreCase("1")){
				picList.add(prefix+spid+"/"+i+".jpg");
			}
		}
		return picList;
	}
}
